package torres.item;

import torres.entity.Entity;

/**
 * @author Torres
 * Represents an Obstacle, a permanently impassable item.
 */
@SuppressWarnings("serial")
public class ObstacleItem extends Item 
{
	/**
	 * Creates a new Obstacle with the specified name.
	 * @param name The name of the Obstacle.
	 */
	public ObstacleItem(String name) {
		this.setName(name);
		this.setAsciiRep("Z");
		super.setConsumed(false);
	}
	
	/**
	 * Creates a new Obstacle that is a copy of the specified Obstacle.
	 * @param item The item to be copied.
	 */
	public ObstacleItem(ObstacleItem item) {
		this(item.getName());
	}
	
	/**
	 * Triggers the effect of an Entity walking on this item.
	 * @param e The Entity that is walking on this item
	 */
	public void onTouch(Entity e) {
		
		/* this method intentionally left almost blank */
	}
	
	/**
	 * Tests to see if this item is an Obstacle.
	 * @return True.
	 */
	public boolean isObstacle() {
		
		return true;
	}
}
